Yes.
try
and catch
Work
Here is how try
and catch
work:
try{}
block,
the catch{}
blocks are examined one-by-one starting starting with
the first.catch{}
block to match the type of the exception
gets control.catch{}
block gets control.catch{}
block matches the exception, none is picked,
and execution leaves this method (just as if there were no try{}
block.)
catch{}
block execute sequentially.
After the last statement executes, control goes to the first statement
that follows the try/catch
structure.try
block.
Must the catch{}
blocks list all possible exceptions?